﻿#ifndef MONITOR_H
#define MONITOR_H

#include <QMap>
#include <QString>
#include <QList>
#include "Performer.h"
#include "Position.h"

class Monitor
{
public:
    Monitor();
    ~Monitor();

    //命令Performer执行行动
    void execute(QList<Performer*> execute_compo);

    //对两个Performer进行指挥,分主动和被动
    void command(QList<Performer*> active_compo, QList<Performer*> passive_compo);

private:
    //判断两个Performer的位置
    Position check(const Shape &fix, const VPoint &fix_site,
                 const Shape &shift, const VPoint &shift_site);

    //判断两个点的位置
    Position checkPoint(const VPoint &po_fix, double r_fix, const VPoint &po_shift, double r_shift);

    //判断点与线的位置
    Position checkLine(const VPoint &po_fix_a, const VPoint &po_fix_b, double r_fix,
                     const VPoint &po_shift, double r_shift);
};

#endif // MONITOR_H
